# import time #import time as timi timi.sleep()
# time.sleep()
from time import sleep
#存在区别一个可以直接调用方法
# from time import *
# sleep()
#导入指定的功能


#导入py
#import 0927.file



f1=open("C:/Users\徐赛坤\Desktop\ew.txt","r",encoding="UTF-8")
f2=open("C:/Users\徐赛坤\Desktop\we.txt","w",encoding="UTF-8")

for x in f1:
    x=x.strip()
    if x.split(",")[1]=="测试":
        continue
    f2.write(f"{x}\n")
f1.close()
f2.close()

try:
    print("可能出现异常的代码")
except:
    print("出现异常执行的代码")
else:
    print("没有异常输出的")
finally:
    print("无论如何都会执行")
#except Exception as e:跟上面的一样
#except(NameError,ZeroDivisionError)as e: 指定异常和多个异常
